1. Field of the Invention
The present invention is generally related to a method for recording a plurality of data sets onto an optical storage medium, and more specifically, to a method by utilizing a temporary storage device in an optical storage system to record a plurality of data sets that is corresponding to a plurality of defective data blocks onto an optical storage medium according to a sorting process.
2. Description of the Prior Art
Upon the arrival of the era for communications and multimedia, the demand for higher density and capacity of storage media in computers, communication devices, and consumer electronics is continuously increasing. As data transmission increases, the need for high density, ultra compact, and cost-efficient storage media is our focus. Storage media such as an optical disc provides low cost yet portable and lightweight storage and has sufficient data capacity, which has become the preferred choice in the modern society as the most popular format for multimedia storage. Especially in the research and development in re-writable optical discs that allow users to input data onto the optical disc according to personal preferences therefore optical disc has become the most significant form of multimedia storage. As a result, the method for producing high reliable and high efficient optical discs for multimedia storage is the main focus of the industry.
An optical storage medium (e.g., an optical disc) is primarily placed in an optical storage system, such as an optical disk drive. Please refer to FIG. 1, which is a schematic block diagram of an optical disk drive 10 for accessing an optical disc 22 according to the prior art. The optical disk drive 10 comprises a loader 14, a motor 12 utilized for rotating the loader, a pickup head 16 utilized for accessing the data sets in the optical disc, a control circuitry 18 utilized for controlling the operation of the optical disk drive 10, and a memory 20. The memory 20 utilized for temporarily storing the data sets necessary for the operation of the control circuitry 18 can be a volatile Dynamic Random Access Memory (DRAM) or other kinds of memory devices. The optical disc 22 comprises a plurality of tracks 24 utilized for recording the data sets. When the optical disc 22 is placed on the loader 14, the motor 12 can drive the optical disc 22 to rotate. By the rotation of the optical disc 22, the tracks 24 of the optical disc 22 are swept by the pickup head 16, and the control circuitry 18 can access the data sets on the tracks 24 through the pickup head 16. The control circuitry 18 accesses the data sets of the optical disc 22 according to the control of a host 26, and the host 26 can be a computer system of a personal computer.
As we want to achieve the function of the optical disc 22 in FIG. 1 for recording data sets more reliably and durably, certain defect management mechanisms have already been set in optical disc standards. One of the general methods is to divide the optical disc 22 into several parts and assign some of them to be spare record areas. When there are defective areas of the optical disc 22 where they cannot be utilized for recording data sets, the data sets that are originally to be recorded into the defective areas will be recorded into the spare record areas. Hence, the data recording function of the optical disc 22 is not affected by the defective areas. Please refer to FIG. 2, which is a schematic diagram of the configuration of a spare record area and a general record area conforming to a DVD (Digital Versatile Disk)+MRW standard. In FIG. 1, each track 24 of the optical disc 22 utilized for recording data sets is regarded to be divided into several large areas a lead-in area LI, a data zone DZ, and a lead-out area LO, respectively. The lead-in area LI, the lead-out area LO are respectively utilized for indicating the beginning and the ending of the track 24, and the data zone DZ is utilized for recording data sets. In the lead-in area LI, there is a main table area (MTA) utilized for storing a defective table DT. The data zone DZ is divided into a general application area GAA; a secondary table area STA for storing a backup of a defective table; a user data area UDA; and two spare areas SA1 and SA2. The user data area UDA comprises a plurality of data blocks Bd. Each data block Bd is utilized for recording a data set, and the spare areas SA1 and SA2 respectively comprise a plurality of spare data blocks Bs as well. Each spare data block Bs is also utilized for recording a data set. The capacity of a data block Bd and the capacity of a spare data block Bs are identical. A data block Bd and a spare data block Bs can respectively be a standard space for recording data sets.
Please proceed to refer to FIG. 1 and FIG. 2. When the optical disk drive 10 records a plurality of data sets transmitted from the host 26 onto the optical disc 22, these data sets will be temporarily stored into the memory 20 which are recorded into data blocks Bd of the track 24. If a defective data block Bd being unable to be utilized for recording a data set exists, it is necessary to find out a spare data block Bs on the track 24 as a replacement, (a spare data block Bs in the spare area SA2 is usually utilized) and record the data set which is supposedly to be recorded into the defective data block Bd into the spare data block Bs as a replacement. Please refer to FIG. 3, which is a schematic diagram of a detailed embodiment of the memory 20 in FIG. 1. The memory 20 comprises a main storing section 27 and a spare storing section 29. The main storing section 27 is utilized for storing a plurality of data sets transmitted from the above-mentioned host 26. After some data sets corresponding to the defective data blocks Bd are inspected, those data sets corresponding to the defective data blocks Bd will be marked, sent to, and stored in the spare storing section 29, and finally recorded into the spare data blocks Bs as replacements. In actual operation, each spare data block Bs and each data block Bd respectively have its own number such as a physical block number (PBN). For a clear description, it is defined in the present embodiment that each data set corresponding to a defective data block Bd corresponds to a RPBN (replace PBN), and each original defective data block Bd also corresponds to a DPBN (defective PBN). The relationship between a defective data block Bd and a corresponding spare data block Bs utilized for substituting for the defective data block Bd is recorded into the defective table DT of the above-mentioned optical disc 22, namely, each relationship between a corresponding RPBN and a DPBN is recorded into the defective table DT. Please refer to FIG. 4, which is a schematic diagram of an embodiment of a defect management mechanism according to the prior art. FIG. 4 shows that there are five defective data blocks Bd(1)–Bd(5) in the user data area UDA of the track 24 in FIG. 1, wherein the data blocks Bd(1) and Bd(2) are the defective data blocks Bd that are checked and marked during last operation. The data blocks Bd(1) and Bd(2) correspond to DPBN(1), DPBN(2) and RPBN(1), RPBN(2), respectively. The data blocks Bd(3), Bd(4) and Bd(5) are the defective data blocks Bd that are checked and marked during the present operation. The data blocks Bd(3), Bd(4) and Bd(5) correspond to DPBN(3), DPBN(4), DPBN(5) and RPBN(3), RPBN(4), RPBN(5), respectively.
The embodiment of FIG. 4 also shows the corresponding relationship between a user data area UDA of the track 24 in FIG. 1 and the memory 20. During the last operation, RPBN(1) and RPBN(2) corresponding to the defective data blocks Bd are checked and marked and have two consecutive numbers. In the present embodiment, RPBN(1) and RPBN(2) are respectively set to 0X221200 and 0X221210. Please refer to FIG. 5 for the detailed description. The defective physical block numbers DPBNs and the replace physical block numbers RPBNs corresponding to the five defective data blocks Bd(1)–Bd(5) in FIG. 4 are arranged according to the sequence after the check operation of the present operation is performed. FIG. 5 is a table according to an embodiment showing the five defective data blocks in FIG. 4 according to the sequence stored in the spare storing section 29. During the present operation, RPBN(3), RPBN(4) and RPBN(5) that are assigned by the corresponding and checked defective data blocks Bd are also three consecutive numbers 0X221220, 0X221230 and 0X221240, respectively. As mentioned above, before the five data sets (respectively corresponding to the five defective data blocks Bd(1)–Bd(5)) are recorded into the spare data blocks Bs as replacements, (for example, the five spare data blocks Bs being replacements can be Bs(1)–Bs(5)), the five data sets will be sent to and temporarily stored in the spare storing section 29 according to the sequence “Bd(3), Bd(1), Bd(4), Bd(2), Bd(5)” after the present operation. Finally the five data sets are recorded into the corresponding spare data blocks Bs. According to the principles of the above-mentioned operation, even if some segments of the optical disc 22 in FIG. 1 are defective (for example, the defective segments are due to scratches or dusts), the defect management is accomplished by utilizing the spare data blocks Bs to maintain the data recording function of the optical disc 22.
In summary, please refer to FIG. 6 which is a flow chart of the data recording function of the optical disc 22 according to the prior art. The function of the optical disc 22 for recording of data sets conforms to a DVD+MRW standard and comprises the above-mentioned defect management to enhance the reliability of the data recording function of the optical disc 22. The process according to the prior art comprises the following steps:
Step 100: Start;
Step 102: The optical disk drive 10 receives an instruction for recording data sets transmitted from the host 26 and it becomes ready to record a plurality of data sets transmitted from the host 26 onto the optical disc 22. Before the optical disk drive 10 records the data sets onto the optical disc 22, the data sets transmitted from the host 26 will be first temporarily stored in the main storing section 27 of the memory 20;
Step 104: In the process of storing a data set transmitted from the host 26, the main storing section 27 of the memory 20 is determined whether it is full; if the main storing section 27 is full, the process of storing data sets into the main storing section 27 of the memory 20 will be paused, and go to step 106;
Step 106: Check if any defective data blocks Bd exist in the data recording process of the optical disc 22. If a defective data block Bd exists, go to step 108; if not, go to step 112;
Step 108: According to the prior art, once if defective data blocks Bd exist, the defective data blocks Bd will be marked, and the corresponding data sets will be first sent to and stored in the spare storing section 29 of the memory 20;
Step 110: Record the data sets that are temporarily stored in the spare storing section 29 of the memory 20 and are supposedly recorded into the defective data blocks Bd into the spare data blocks Bs as replacements. According to the defective table DT, the optical disk drive 10 can find out the numbers of spare data blocks Bs corresponding to defective data blocks Bd, and make the pickup head 16 seek to the locations of the spare data blocks Bs as replacements. The data sets will be recorded into the corresponding spare data blocks Bs of the optical disc 22 to maintain the data recording function of the optical disc 22;
Step 112: Proceed to record the data sets normally, namely, to record the data sets into the data block Bd assigned by the host 26. If the process is from step 110 to the present step, which means that after the optical disk drive 10 moves the pickup head 16 in the step 110 to record the data sets into the spare data blocks Bs, the optical disk drive 10 moves the pickup head 16 again to the locations of the corresponding data blocks Bd, and proceed to record the data sets;
Step 114: Determine if any new request of data recording is received. If yes, go back to step 102 and process the following data recording; if not, go to step 116;
Step 116: End the operation of data recording, and finish the process according to the prior art.
Please refer back to FIG. 4. As mentioned above, the sequence of the five data sets in the spare storing section 29 of the memory 20 is “Bd(3), Bd(1), Bd(4), Bd(2), Bd(5)”. Please note that for the RPBNs, at this point, the sequence of the five data sets in the above-mentioned spare storing section 29 is composed of five inconsecutive numbers. Please refer back to FIG. 5. In the embodiment according to the prior art, the discontinuity of the five RPBNs corresponding to the five data sets is emphasized. As mentioned in step 110 in FIG. 6, when the defective data blocks Bd have been found resulting in the data sets that are temporarily stored in the spare storing section 29 being recorded into the spare data blocks Bs as replacements, the pickup head 16 must seek tracks until the corresponding locations of the spare data blocks Bs are reached for recording the data sets into the spare data blocks Bs instead of the defective data blocks Bd. However, during a seeking process, the pickup head 16 can only record the data sets into a plurality of adjacent spare data blocks Bs, and these adjacent spare data blocks Bs correspond to the consecutive RPBNs. In other words, if the sequence of data recording corresponds to the inconsecutive RPBNs, the pickup head 16 must separately record a plurality of data sets into the corresponding spare data blocks Bs in different seeking processes. Please refer back to the embodiment in FIG. 4, because the sequence of the five data sets (“Bd(3), Bd(1), Bd(4), Bd(2), Bd(5)”) in the spare storing section 29 is composed of five inconsecutive RPBNs, such that the pickup head 16 must separately record the five data sets into the corresponding spare data blocks Bs in five different seeking processes and not at all by the same seeking process.
Please refer back to the optical disc standard in FIG. 2. The areas occupied by each spare data block Bs in the optical disc 22 (such as the spare areas SA1 and SA2) and the areas occupied by the data blocks Bd (a user data area UDA) are alternatively interlaced onto the track 24. Hence, the pickup head 16 may move from the original number corresponding to a data block Bd to the number corresponding to the spare data block Bs in each seeking process. It is necessary to proceed the long-distance and crossing-track move, in which the time-consumption during the seeking process is inevitable. If the amount of data sets having inconsecutive RPBNs is increased, the efficiency of data recording function of the optical disc 22 is rapidly reduced due to the frequent seeking processes according to the prior art. The operational burden of the actuating mechanisms of the pickup head 16 in FIG. 1 is also increased, causing it to wear out easily. Moreover, in the above-mentioned embodiment, the data sets are first sent to the spare storing section 29 for storage, and are recorded into the spare data blocks Bs by one seeking process or several seeking processes. The design mentioned above limits the amount of data sets corresponding to the defective data blocks Bd, which can be processed during each seeking process, to the capacity of the spare storing section 29 of the memory 20. Usually for the design of the memory 20, the capacity of the main storing section 27 is far greater than the capacity of the spare storing section 29. If the amount of defective data blocks Bd checked is greater than the capacity of the spare storing section 29 during a recording operation, it is inevitable that the recording operation has to be accomplished by several operations to reduce the efficiency of the data recording process of the optical disc. Please note that the above-mentioned embodiments from FIG. 2 to FIG. 6 are the operating conditions according to the DVD (Digital Versatile Disk)+MRW standard. If the related configuration and the recording operation is almost the same as those mentioned above according to different optical disc standards such as a CD-MRW (Compact Disk-Mount Rainier reWritable) standard, namely, the speed of recording data sets may be limited to the capacity of the spare storing section 29 or too many seeking processes.